package com.zoe.app.annotation;

import com.zoe.app.dynamic.DynamicDataSourceProvider;
import org.springframework.core.annotation.AliasFor;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * @author zoe.Zhang
 * @date 2023/02/24
 * @description
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface DataSource {
    String name() default DynamicDataSourceProvider.MASTER;

    @AliasFor(value = "name")
    String value() default DynamicDataSourceProvider.MASTER;
}
